@extends('admin.common.main')
@section('css')
<style>
    .but{
        width: 70px;
        height: 30px;
        padding: 5px;
        border: none;
        cursor: pointer;
        margin-left:44%;
        margin-top: 10px;
        border-radius: 30%;
        font-size: 13px;
        background-color: bisque;
        color: red;
        font-weight: bold;
    }
    .mycheck{
        width: 200px;
        height: 30px;
        line-height: 30px;
        color:coral;
        font-weight: bold;
        margin: auto;
    }
    .backs{
        display: block;
        width: 50px;
        height: 30px;
        background-color: antiquewhite;
        text-align: center;
        line-height: 30px;
    }
</style>
@endsection
@section('cnt')
<div class="x-body">
    @include('admin.common.validate')
    @include('admin.common.msg')
    <a class="backs" href="{{ route('admin.role.index') }}">返回</a>
    <form class="" action="{{ route('admin.role.node',$role) }}" method="post" id="form-member-add">
        {{ csrf_field() }}
        @foreach($nodeAll as $item)
        <div class="mycheck">
            <input type="checkbox" name="node[]" value="{{ $item['id'] }}"
                @if(in_array($item['id'],$nodes)) checked @endif
            > &nbsp;&nbsp;&nbsp; 
            {{ $item['html'] }}  {{ $item['name'] }}
        </div>
        @endforeach
        <button  class="but" type="submit">
            添加用户
        </button>
    </form>
</div>
@endsection
@section('js')
<script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script>
   


</script>
@endsection